package designPattern.action11.command.c4t2;

import designPattern.action11.command.c4t2.concrete.command.ConcreteCommand;
import designPattern.action11.command.c4t2.tools.CompanyArmy;
import designPattern.action11.command.c4t2.sketch.ArmySuperior;
import designPattern.action11.command.c4t2.sketch.Command;
/*
命令模式
本例子是简单版

 */
public class Application {
    public static void main(String args[]) {
        CompanyArmy 三连 = new CompanyArmy();         //创建接收者
        ArmySuperior 指挥官 = new ArmySuperior();     //创建请求者

        Command command = new ConcreteCommand(三连);  //创建具体命令并指定接收者
        指挥官.setCommand(command);
        指挥官.startExecuteCommand();
    }
}
